package com.quan.system.rpc;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * 服务启动类
 * Created by ZhangShuquan on 2017/2/3.
 */
public class QuanSystemRpcServiceApplication {

	private static Logger logger = LoggerFactory.getLogger(QuanSystemRpcServiceApplication.class);
	
	public static void main(String[] args) {
		try {
			logger.info(">>>>>>>>>> quan-system-rpc-service 正在启动 <<<<<<<<<<");
			new ClassPathXmlApplicationContext("classpath:spring-context.xml").start();
			logger.info(">>>>>>>>>> quan-system-rpc-service 启动完成 <<<<<<<<<<");
		} catch (Exception e) {
			logger.error("== DubboProvider context start error:",e);
		}
		synchronized (QuanSystemRpcServiceApplication.class) {
			while (true) {
				try {
					QuanSystemRpcServiceApplication.class.wait();
				} catch (InterruptedException e) {
					logger.error("== synchronized error:",e);
				}
			}
		}
		
	}

}
